package com.nandi.emergencyinspection.mvp

import com.nandi.emergencyinspection.api.ApiServices
import com.tbright.ktbaselibrary.extension.response
import kotlinx.coroutines.launch

/**
 * @创建者: qingsong
 * @创建时间: 2021/3/25 13:28
 * @描述:
 */
class VersionPresenter : VersionContract.VersionPresenter() {
    override fun getImToken() {
        mView?.showLoading()
        mainScope.launch {
            val singlePoetry = ApiServices.instance.singlePoetryAsync().response()
            if (singlePoetry != null) {
                mView?.showResult(singlePoetry)
            }
            mView?.hideLoading()
        }
    }
}